QuickOPC User's Guide and Reference
Invoking the Operations
Development Models > Live Mapping Model > Live Mapping Model for OPC Data (Classic and UA) > The Mapper Object > Invoking the Operations

Once you have your objects mapped, you can invoke operations on them. The operations available depend on the type of mapper object.

For OPC Data Access (the DAClientMapper class), following methods exist for invoking operations:

For OPC Unified Architecture (the UAClientMapper class), following methods exist for invoking operations:

Each operation can be invoked either on all applicable mappings currently existing in the mapper, or on a specified subset of mappings. For example, the Read method on DAClientMapper has two overloads, one with no arguments (reads all item mappings that have DAItemMappingOperations.Read included in their Operations property), and one with the IEnumerable<IDAClientMapping> argument (reads just the specified mappings).

Since you typically do not have direct access to the individual mappings created for your objects (except with Type-less Mapping), you might be asking how to get access to the subset of mappings that you need. For example, you may need to perform an OPC Read on just certain mapped object, somewhere inside the whole hierarchy.

The way to obtain the set of mapping is to query the mapper itself. The Mappings property of the mapper contains an IEnumerable<> of all mappings currently maintained by the mapper. You can filter these mappings in any way you like, testing whether they fulfill your application-defined criteria, and then perform the operation just with the filtered subset.

In order to make this task easier, some extension method exist. Following methods are available for all OPC specifications:

For OPC Data Access, you can use following extension methods:

For OPC Unified Architecture, you can use the following extension methods: 

With each of the extension methods on the DAClientMapperExtension or UAMapperExtension, you can also specify that just members with given mapping tag, or with tags fulfilling certain condition (predicate) will be affected.

The DAClientMapper and UAClientMapper objects have a Boolean QueuedExecution property (defaults to false). When set to 'true', the operations on the mapper are executed outside the calling thread, but still in the order of arrival. This allows non-blocking operation calls on the mappers.

See Also